<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
    String path = request.getContextPath();
    if (path.length() > 0) path = path.substring(0, path.length() - 1);
%>

<!-- head如果图片高度不合适。请修改Common.ces里面的".Header .HeaderTop"的高度。和".Header"的高度-->
<jsp:include flush="true" page="/view/inc/incTop.jsp"/>
<!-- head-->
<script language="javascript">
    function back() {
        window.history.go(-1);
    }

    function payType() {
        var orderPayType = document.f.orderPayType.value;
        if (orderPayType == 1) {
            document.getElementById("pt").style.display = "block";
        }
        if (orderPayType == 0) {
            document.getElementById("pt").style.display = "none";
        }
    }

    function cardNum() {
        var url = "<%=path %>/view/order/cardNum.jsp";
        window.frames.user.src = url;
        $('#userInfo').modal();
    }
</script>


<!--body-->
<div class="container well" style="background:#fff;padding-top:0px;">
    <div class="row">
        <h2 style="text-align: center;">订单确认</h2>
    </div>
    <hr style="margin-top:0">
    <div class="row">
        <div class="col-md-3"></div>
        <div class="col-md-6" style="padding-top: 40px">
            <form id="order" action="<%=path %>/order/orderSubmit.action" name="f" method="post"
                  class="form-horizontal">
                <div class="form-group">
                    <label class="col-sm-2 control-label">收货人</label>
                    <div class="col-sm-10">
                        <div class="form-control-static">
                            <s:property value="#session.user.userName"/>
                            (<s:property value="#session.user.userRealname"/>)
                        </div>

                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">联系电话</label>
                    <div class="col-sm-10">
                        <div class="form-control-static">
                            <s:property value="#session.user.userTel"/>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">邮箱</label>
                    <div class="col-sm-10">
                        <input class="form-control" type="text" name="orderEmail" value="${user.userEmail}"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">付款方式</label>
                    <div class="col-sm-10">
                        <select class="form-control" name="orderPayType" style="width:155px;" onchange="payType()">
                            <option value="0">支付宝</option>
                            <option value="1">银行付款</option>
                        </select>
                        <a class="btn btn-default" onclick="cardNum()" id="pt" style="display: none">查看卡号</a>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-8"></div>
                    <div class=" col-sm-4">
                        <button id="button" class="btn btn-default" onclick="back()">返回</button>
                        <input type="submit" class="btn btn-success" value="提交订单"/>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<!--body-->


<!--foot -->
<jsp:include flush="true" page="/view/inc/incFoot.jsp"/>

